package gold.digger;

import gold.utils.InputUtil;

/**
 * Created by fanzhenyu02 on 2021/12/10.
 * common problem solver template.
 */
public class LC780 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public boolean reachingPoints(int sx, int sy, int tx, int ty) {
            while (sx < tx && sy < ty) {
                if (tx < ty) ty %= tx;
                else tx %= ty;
            }
            if (tx < sx || ty < sy) return false;
            return sx == tx ? (ty - sy) % tx == 0 : (tx - sx) % ty == 0;
        }
    }


    public void run() {
        int[] arr = InputUtil.toIntegerArray("[1,2,3]");
        System.out.println(new Solution().toString());
    }

    public static void main(String[] args) throws Exception {
        LC780 an = new LC780();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
